//
//  XButton.m
//  BtnText
//
//  Created by KiVen on 15/11/10.
//  Copyright © 2015年 张文权. All rights reserved.
//

#import "XButton.h"

@implementation XButton

-(void)setIsChoice:(BOOL)isChoice{
    
    _isChoice=isChoice;
    
    if (isChoice) {
        
        [self setCustomState:1];
        
    }else{

        [self setTitleColor: UIColorFromString(@"#666666") forState:UIControlStateNormal];
        
        [self setImage:[UIImage imageNamed:@"btn_017"] forState:UIControlStateNormal];
        
    }

}

- (void)setCustomState:(int)customState{
    
    _customState = customState;
    if (customState == 1) {
        [self setTitleColor:kColor_AppNavColor forState:UIControlStateNormal];

        [self setImage:[UIImage imageNamed:@"btn_020"] forState:UIControlStateNormal];

    }else{
        [self setImage:[UIImage imageNamed:@"btn_016"] forState:UIControlStateNormal];



    }
    
}

@end
